package bbs.entity.enums;

public enum RegisterEnum {

    COMPLETED(0, "注册成功"),
    FAILED(1, "注册失败");

    private Integer type;
    private String desc;

    private RegisterEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }
    public Integer getType() {
        return type;
    }
    public String getDesc() {
        return desc;
    }
    public static RegisterEnum getEnum(Integer type) {
        for (RegisterEnum e : RegisterEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
}
